package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.LoanNewCreditCardInfoService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanNewCreditCardInfoRequest;
import com.tuanzi.loan.vo.response.family.LoanNewCreditCardInfoResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 17:54 2018/8/31
 * Description:
 */
public class LoanNewCreditCardInfoLazyDataModel extends BaseLazyDataModel<LoanNewCreditCardInfoRequest,LoanNewCreditCardInfoResponse> {


    private static final long serialVersionUID = 1855867454771933402L;

    private LoanNewCreditCardInfoService loanNewCreditCardInfoService = SpringContextHolder.getBean(LoanNewCreditCardInfoService.class);

    public LoanNewCreditCardInfoLazyDataModel(LoanNewCreditCardInfoRequest loanNewCreditCardInfoRequest) {
        super(loanNewCreditCardInfoRequest);
    }

    @Override
    protected Page<LoanNewCreditCardInfoResponse> doLoad(PageSearcher<LoanNewCreditCardInfoRequest> pageSearcher) {
        return loanNewCreditCardInfoService.list(pageSearcher);
    }
}
